const mongoose =require('mongoose');
//创建文档的结构对象
let BookSchema = new mongoose.Schema({  
    //设置集合中文档的属性和属性值的类型
    name:String,
    author:String,
    price:Number
});

//创建模型对象--------对文档操作的封装对象
let BookModel = mongoose.model('novel',BookSchema);

//暴露模型对象
module.exports = BookModel;
